package com.project.dao;

import com.project.bean.CoachBean;
import com.project.bean.CoachDTO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface CoachMapper {
    int deleteByPrimaryKey(Integer cId);
    
    int insert(CoachBean record);

    int insertSelective(CoachBean record);

    CoachBean selectByPrimaryKey(Integer cId);

    int updateByPrimaryKeySelective(CoachBean record);

    int updateByPrimaryKey(CoachBean record);

    int insertBatchSelective(List<CoachBean> records);

    int updateBatchByPrimaryKeySelective(List<CoachBean> records);
    
    //修改信息
    int updateByUid(CoachBean record);
    //查询详情
	CoachBean findByUid(Integer cUId);
	//查询所有
	List<CoachBean> findAll();
	//新增一个教练
	int insertCuid(Integer cUId);
	//分页查询教练
	List<CoachBean> findAllByPage(Map<String, Integer> map);
	//分页查询每种流派的教练
	List<CoachBean> findSchoolByPage(Map<String, Integer> map);
	
	//按条件查询的教练数量
	int findcondition(Map<String, Object> map);
	//按条件查询
	List<String> findConditionByPage(Map<String, Object> map);
	
	//注册user的时候在教练表中添加一个相应的用户
	int addCoachCUId(int cuid);
    //完善教练信息
    int updateCoachtMessage(@Param("cRealname")String sRealname,@Param("cAge") int cAge,@Param("cGender")int cGender,@Param("cSchool")int cSchool,@Param("cId")int id);
	//选择更新教练信息，比如更改教练认证状态
    int updateByCUIdSelective(CoachBean coach);
}